package qn.common.utils;

import org.nustaq.serialization.FSTConfiguration;

public class SerializeUtil {
    static FSTConfiguration CONFIG = FSTConfiguration.createDefaultConfiguration();

    public SerializeUtil() {
    }

    public static byte[] serialize(Object object) throws Exception {
        return CONFIG.asByteArray(object);
    }

    public static Object unserialize(byte[] bytes) throws Exception {
        return CONFIG.asObject(bytes);
    }
}
